#define _CRT_SECURE_NO_WARNINGS  1

#include<stdio.h>

int removeDuplicates(int* nums, int numsSize)
{
    int dst = 0;
    int src = 0;
    for (int i = 0; i < numsSize; i++)
    {
        if (nums[src] != nums[dst])
        {
            nums[++dst] = nums[src++];
        }
        else
        {
            src++;
        }
    }
    return dst + 1;
}

int main()
{
    int nums[3] = {1,1,2};
    removeDuplicates(nums, 3);
    return 0;
}